<template>
	<!-- 确认弹窗 -->
	<fpopup class="fconfirm" :title="title" isclose>
		<!-- 内容盒子 -->
		<div class="flexcent contenttext">{{content}}</div>
		<!-- 按钮位置 -->
		<div class="flexspb confirmfoot">
			<!-- 按钮配置 -->
			<fbutton @change="change('cancel')" :type="canceltype">{{canceltext}}</fbutton>
			<!--  -->
			<fbutton @change="change('confirm')">{{oktext}}</fbutton>
		</div>
	</fpopup>
</template>

<script>
	import fpopup from "./fpopup.vue"
	export default {
		name: 'fconfirm', //确认弹窗
		components: {
			fpopup, //弹窗背景
		},
		data() {
			return {
				title: "", //标题
				content: "", //内容
				oktext: "确认", //确认按钮文字
				canceltext: "取消", //取消按钮文字
				canceltype: "info"
			}
		},
		methods:{
			// 操作
			change(text){
				this.$emit(text)
			},
		}
	}
</script>
<style lang="less" scoped>
	.fconfirm {

		// 内容
		.contenttext {
			width: 550rpx;
			font-size: 30rpx;
			color: #333333;
			padding: 30rpx 20rpx 50rpx;
		}

		// 按钮
		.confirmfoot {
			padding: 0 50rpx;

		}
	}
</style>